<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link href="${initParam.url }/statics/css/complaint.css" rel="stylesheet">
<link href="${initParam.url }/statics/css/homemakeList.css" rel="stylesheet">
<link rel="styleshet"
	href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
	integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
	integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
	crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
	src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
	integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
	crossorigin="anonymous"></script>
<script src="${initParam.url }/statics/js/jquery-1.12.4.js"></script>
<script type="text/javascript">
	$(function() {
		
				
	})
</script>
</head>
<body>
	<div
		style="width: 1100px; height: 520px; background-color: #FFF; margin: 20px;">
		<h4
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px;">
			<img alt="" src="${initParam.url}/statics/images/title.jpg">房屋列表
		</h4>

		<div
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px; width: 1000px; height: 60px; margin-left: 20px;">
			<form action="homemakeList" class="navbar-form navbar-left" role="search"  method="get">
			

				<div class="form-group">
					<label class="name1">关键字：</label><input type="text" class="form-control" id="name1"
						placeholder="" name="name1">
				</div>
				<button type="submit" class="btn btn-default" id="name2">
					<span class="glyphicon glyphicon-search"></span>
				</button>
			</form>
		</div>
		
		<table class="table table-hover " id="tab"  >
			<tr  >
				<th>家政名称</th>
				<th>联系电话</th>
				<th>服务范围</th>
				<th >操作</th>
			</tr>
			<c:forEach var="hl" items="${homemakes }">
				<tr>
					<td>${hl.name }</td>
					<td>${hl.phone }</td>
					<td>${hl.serviceArea }</td>
					<td ><a href="homemakedetail?id=${hl.id}">查看详情</a> | <a href="homemakeup?id=${hl.id}">修改</a> | <a href="delete?id=${hl.id}">删除</a></td>
				</tr>
			</c:forEach>
		</table>
<div class="ta-1">		
     	<c:if test="${totalPages>0}">
		<c:if test="${page>1}">
			<a href="?page=${page-1}">[上一页]</a>
		</c:if>
		<c:if test="${id<=1}">
			<a>[上一页]</a>
		</c:if>
		<c:if test="${page<totalPages}">
			<a href="?page=${page+1}">[下一页]</a>
		</c:if>
		<c:if test="${page>=totalPages}">
			<a>[下一页]</a>
		</c:if>
		第 ${page} 页，共 ${totalPages} 页
	</c:if>
		</div>
	</div>
</body>
</html>